<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title th:replace="${title}">文章详情</title>
    <link rel="shortcut icon" href="../../static/image/关于我.jpg" th:href="@{/image/关于我.jpg}" type="image/x-icon">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="../static/lib/editormd/css/editormd.min.css"
          th:href="@{/lib/editormd/css/editormd.min.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
</head>
<body>
<!-- 导航 -->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">管理后台</h2>
            <a href="#" th:href="@{/admin/blogs}" class="m-item item m-mobile-hide" th:classappend="${n==1} ? 'active'"><i
                    class="home icon"></i>博客</a>
            <a href="#" th:href="@{/admin/types}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><i
                    class="idea icon"></i>分类</a>
            <a href="#" th:href="@{/admin/tags}" class="m-item item m-mobile-hide"
               th:classappend="${n==3} ? 'active'"><i class="tags icon"></i>标签</a>
            <a href="#" th:href="@{/admin/upload}" class="m-item item m-mobile-hide"><i
                    class="home icon"></i>上传图片</a>
            <a  href="#" th:href="@{/}" class="m-item item m-mobile-hide"
               th:if="${loginUser != null}">
                <i class="info icon"></i>博客前台</a>
            <div class="right m-item m-mobile-hide menu" th:if="${loginUser != null}">
                <div class="ui dropdown item">
                    <div class="text">
                        <img class="ui avatar image" src="https://picsum.photos/id/1027/100/100"
                             th:src="${loginUser.headerUrl}" style="width: 30px;height: 30px">
                        <span th:text="${loginUser.nickname}">小圳</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" th:href="@{/user/setting}" class="m-item item m-mobile-hide"
                           th:if="${loginUser != null}">
                            <i class="info icon"></i>账号设置</a>
                        <a href="#" th:href="@{/logout}" class="m-item item m-mobile-hide"
                           th:if="${loginUser != null}">
                            <i class="info icon"></i>退出登录</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</nav>

<th:block th:fragment="script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script src="../static/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
</th:block>

</body>
</html>